package com.ruoyi.knowledgebase.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ruoyi.knowledgebase.domain.Knowledge;
import com.ruoyi.knowledgebase.mapper.KnowledgeMapper;
import com.ruoyi.knowledgebase.service.KnowledgeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class KnowledgeServiceImpl  extends ServiceImpl<KnowledgeMapper, Knowledge> implements KnowledgeService {

    @Resource
    private com.ruoyi.knowledgebase.mapper.KnowledgeMapper KnowledgeMapper;

    @Override
    public List<Knowledge> queryKnowledge(Knowledge Knowledge) {
        return KnowledgeMapper.queryKnowledge(Knowledge);
    }

    @Override
    public boolean deleteKnowledge(Knowledge Knowledge) {
        return KnowledgeMapper.deleteKnowledge(Knowledge.getId())>0;
    }
}
